
#ifndef _RING_BUFFER_H_
#define _RING_BUFFER_H_


typedef struct {
	unsigned char *buf;
	unsigned int  buf_size;
	unsigned int  pos_write;
	unsigned int  pos_read;
} ring_buffer_def;

typedef unsigned char uint8;
typedef unsigned int uint16;


uint16 ring_buffer_read  ( ring_buffer_def *ring_buf , uint8 *buf , uint16 length );
uint16 ring_buffer_write ( ring_buffer_def *ring_buf , uint8 *buf , uint16 length );


#endif
